const crypto = require('crypto')
const captcha = require('trek-captcha')

const setCrypto = info => {
  return crypto
    .createHmac('sha256', 'ewfewfwfw')
    .update(info)
    .digest('hex')
}

const createVerifyImg = async () => {
  let result = await captcha()
  if (result) {
    return result
  } else {
    return false
  }
}

module.exports = {
  setCrypto,
  createVerifyImg
}
